Colin Walters [Mon, 9 Dec 2019 16:10:50 +0000 (16:10 +0000)]
Release 2019.6
Nothing really big here, but let's get a release out
so some bigger things like ro-sysroot, signing, sizes can
bake in master for a bit.
OpenShift Merge Robot [Tue, 3 Dec 2019 14:41:08 +0000 (06:41 -0800)]
Merge pull request #1221 from cgwalters/pull-basic-auth
pull: Add support for basic auth
Colin Walters [Wed, 27 Sep 2017 02:02:25 +0000 (22:02 -0400)]
pull: Add support for basic auth
This has been requested a few times for people delivering
OSTree content and wanting to do access control.
OpenShift Merge Robot [Mon, 2 Dec 2019 13:10:18 +0000 (14:10 +0100)]
Merge pull request #1980 from ssssam/sam/readme-buildstream-tweak
README.md: Tweak text about BuildStream
Sam Thursfield [Sun, 1 Dec 2019 19:43:14 +0000 (20:43 +0100)]
README.md: Tweak text about BuildStream
BuildStream no longer uses libostree internally (see
https://gitlab.com/BuildStream/buildstream/issues/387). It still
has first class support for interoperating with libostree repos.
OpenShift Merge Robot [Tue, 26 Nov 2019 12:52:25 +0000 (13:52 +0100)]
Merge pull request #1978 from agners/fix-build-race
Avoid race condition when building outside of source tree
Stefan Agner [Tue, 26 Nov 2019 08:20:30 +0000 (09:20 +0100)]
Avoid race condition when building outside of source tree
When building outside of source tree it can happen that src/ostree/
does not exist (yet) when bison is called. This leads to an build
error like so:
bison: src/ostree/parse-datetime.c: cannot open: No such file or directory
Make sure that src/ostree/ exists when parse-datetime.c is built.
OpenShift Merge Robot [Mon, 25 Nov 2019 14:26:31 +0000 (15:26 +0100)]
Merge pull request #1976 from cgwalters/repo-finder-test
tests/repo-finder: Run realpath() on /tmp
Colin Walters [Thu, 21 Nov 2019 18:37:48 +0000 (18:37 +0000)]
tests/repo-finder: Run realpath() on /tmp
This fixes running this test case inside
https://github.com/cgwalters/coretoolbox
OpenShift Merge Robot [Thu, 21 Nov 2019 14:14:04 +0000 (15:14 +0100)]
Merge pull request #1968 from ptomato/ostree-async-progress-copy-state
libostree: Add ostree_async_progress_copy_state()
Philip Chimento [Mon, 4 Nov 2019 21:21:36 +0000 (13:21 -0800)]
libostree: Add ostree_async_progress_copy_state()
This allows copying the state from one OstreeAsyncProgress object to
another, atomically, without invoking the callback. This is needed in
libflatpak, in order to chain OstreeAsyncProgress objects so that you
can still receive progress updates when iterating a different
GMainContext than the one that the OstreeAsyncProgress object was
created under.
See https://github.com/flatpak/flatpak/pull/3211 for the application of
this API.
Philip Chimento [Tue, 5 Nov 2019 18:05:45 +0000 (10:05 -0800)]
Bump version in symbols file
There were no new symbols in 2019.5 and this version didn't get bumped
when 2019.5 was released.
OpenShift Merge Robot [Fri, 8 Nov 2019 22:54:12 +0000 (23:54 +0100)]
Merge pull request #1909 from rfairley/rfairley-kargs-order-entries
lib/kernel-args: Store kernel args as key/value entries
OpenShift Merge Robot [Fri, 8 Nov 2019 16:08:15 +0000 (17:08 +0100)]
Merge pull request #1971 from akiernan/us-tests-dir
build: create tests directory for split builds
OpenShift Merge Robot [Fri, 8 Nov 2019 15:26:47 +0000 (16:26 +0100)]
Merge pull request #1972 from cgwalters/bump-libglnx-
20191108
Bump libglnx
Colin Walters [Fri, 8 Nov 2019 13:36:23 +0000 (13:36 +0000)]
Bump libglnx
This has a few fixes, mainly I want to get this in
as prep for fs-verity.
Update submodule: libglnx
```
Alex Kiernan (1):
macros: Add TEMP_FAILURE_RETRY for musl
Alexander Larsson (1):
Add glnx_open_anonymous_tmpfile_full() allowing you to specify the directory
Colin Walters (8):
Merge branch 'shutil-rm-rf-errprefix' into 'master'
Merge branch 'us-temp-failure-retry' into 'master'
Merge branch 'anonymous-tmpfile-dir' into 'master'
Merge branch 'meson-older-compilers' into 'master'
fdio: Add glnx_tmpfile_reopen_rdonly()
Merge branch 'reopen-rdonly' into 'master'
build-sys: Add libglnx-testlib.c to Automake
Merge branch 'testlib-automake' into 'master'
Jonathan Lebon (1):
Merge branch 'uchar' into 'master'
Simon McVittie (5):
missing: Remove unused <uchar.h>
Run the fdio test in its own temporary directory
meson: Define HAVE_DECL_FOO to 0 if foo isn't declared
Make the Meson build work on older compilers
CI: Target a Fedora stable release
Will Thompson (3):
Add meson.build files
Document using this as a Meson subproject
Add GitLab CI
```
Alex Kiernan [Tue, 5 Nov 2019 22:26:23 +0000 (22:26 +0000)]
build: create tests directory for split builds
When `--disable-dependency-tracking` is in effect with separate build
directory, the tests directory isn't created as a result of the
dependency generation, which leads to a build race for the tests
directory being created and failures:
Making all in .
make[2]: Entering directory 'TOPDIR/build/tmp/work/riscv64-yoe-linux-musl/ostree/2019.5-r0/build'
(echo '[Test]' > tests/test-local-pull-depth.sh.test.tmp; \
echo 'Type=session' >> tests/test-local-pull-depth.sh.test.tmp; \
echo 'Exec=env G_TEST_SRCDIR=/usr/libexec/installed-tests/libostree G_TEST_BUILDDIR=/usr/libexec/installed-tests/libostree /usr/libexec/installed-tests/libostree/test-local-pull-depth.sh' >> tests/test-local-pull-depth.sh.test.tmp; \
mv tests/test-local-pull-depth.sh.test.tmp tests/test-local-pull-depth.sh.test)
/bin/sh: tests/test-local-pull-depth.sh.test.tmp: No such file or directory
/bin/sh: line 1: tests/test-local-pull-depth.sh.test.tmp: No such file or directory
/bin/sh: line 2: tests/test-local-pull-depth.sh.test.tmp: No such file or directory
mv: cannot stat 'tests/test-local-pull-depth.sh.test.tmp': No such file or directory
make[2]: *** [Makefile:9282: tests/test-local-pull-depth.sh.test] Error 1
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Robert Fairley [Thu, 29 Aug 2019 16:14:26 +0000 (12:14 -0400)]
lib/kernel-args: Store kernel args as key/value entries
Define an `OstreeKernelArgsEntry` structure, which holds
both the key and the value. The kargs order array stores
entries for each key/value pair, instead of just the keys.
The hash table is used to locate entries, by storing
entries in a pointer array for each key. The same public
interface is preserved, while maintaining ordering
information of each key/value pair when
appending/replacing/deleting kargs.
Fixes: #1859
OpenShift Merge Robot [Thu, 7 Nov 2019 21:47:40 +0000 (22:47 +0100)]
Merge pull request #1970 from cgwalters/keyfile-group-not-found
lib/keyfile: Treat "group not found" the same as "key not found"
Colin Walters [Thu, 7 Nov 2019 16:06:39 +0000 (16:06 +0000)]
lib/keyfile: Treat "group not found" the same as "key not found"
Prep for fsverity, where I want to create a new group
`[fsverity]` in the keyfile that has default values. We should
treat the absence of a group the same as absence of a key
in these "with defaults" APIs.
OpenShift Merge Robot [Wed, 6 Nov 2019 15:39:59 +0000 (16:39 +0100)]
Merge pull request #1969 from ricardosalveti/master
Makefile: declare ostree_boot_SCRIPTS and append values
Ricardo Salveti [Wed, 6 Nov 2019 00:16:07 +0000 (21:16 -0300)]
Makefile: declare ostree_boot_SCRIPTS and append values
ostree_boot_SCRIPTS was being set on both Makefile-boot.am and
Makefile-switchroot.am, causing the first one to be replaced by the
other at the final Makefile, so declare as empty and append on both
places instead.
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
OpenShift Merge Robot [Sat, 2 Nov 2019 16:03:37 +0000 (17:03 +0100)]
Merge pull request #1966 from akiernan/us-musl-tests
Fix tests with musl
OpenShift Merge Robot [Fri, 1 Nov 2019 18:42:19 +0000 (19:42 +0100)]
Merge pull request #1965 from akiernan/us-lc-all-en-us
tests/core: Fallback to en_US.UTF-8 locale
Alex Kiernan [Thu, 31 Oct 2019 17:09:36 +0000 (17:09 +0000)]
tests: Avoid musl failure with `cp -a`
When copying the tree, using musl and GNU coreutils, something gets confused
when setting the ownership of symlinks and the copy fails with:
cp: failed to preserve ownership for osdata-devel/bin: Not supported
Rework using tar to avoid the problem.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Alex Kiernan [Thu, 31 Oct 2019 11:28:07 +0000 (11:28 +0000)]
tests/core: Assume C.UTF-8 if locale isn't found
When building with musl there's no locale command, also its default
locale is C.UTF-8, so just get C.UTF-8 if we can't find locale.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Alex Kiernan [Thu, 31 Oct 2019 11:30:00 +0000 (11:30 +0000)]
tests: Handle EPIPE failures when head terminates
When using musl, it appears that the default is line buffered output, so
when `head -1` reads from a pipe we have to handle the source end of the
pipe getting EPIPE.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Alex Kiernan [Wed, 30 Oct 2019 07:55:41 +0000 (07:55 +0000)]
tests/core: Fallback to en_US.UTF-8 locale
A number of tests expect explicit left/right single quotes in their
messages, which will never happen in the C locale. Change so we pick a
likely UTF-8 locale, or fail if we can't find one.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
OpenShift Merge Robot [Wed, 30 Oct 2019 17:46:41 +0000 (18:46 +0100)]
Merge pull request #1963 from cgwalters/release
Release 2019.5
Colin Walters [Thu, 24 Oct 2019 15:18:45 +0000 (15:18 +0000)]
Post-release version bump
Colin Walters [Thu, 24 Oct 2019 15:18:23 +0000 (15:18 +0000)]
Release 2019.5
OpenShift Merge Robot [Wed, 30 Oct 2019 13:20:08 +0000 (14:20 +0100)]
Merge pull request #1962 from jlebon/pr/support-hmac
lib/deploy: Also install HMAC file into /boot
Jonathan Lebon [Tue, 29 Oct 2019 20:45:29 +0000 (16:45 -0400)]
lib/deploy: Also install HMAC file into /boot
To allow for FIPS mode, we need to also install the HMAC file from
`/usr/lib/modules` to `/boot` alongside the kernel image where the
`fips` dracut module will find it. For details, see:
https://github.com/coreos/fedora-coreos-tracker/issues/302
Note I didn't include the file in the boot checksum since it's itself a
checksum of the kernel, so we don't really gain much here other than
potentially causing an unnecessary bootcsum bump.
OpenShift Merge Robot [Tue, 29 Oct 2019 05:26:17 +0000 (06:26 +0100)]
Merge pull request #1953 from uajain/uajain/fix-memory-leak
async-progress: Plug memory leak while destroying GSource
OpenShift Merge Robot [Mon, 28 Oct 2019 19:58:37 +0000 (20:58 +0100)]
Merge pull request #1961 from jlebon/pr/refine-gsource
lib/pull: Tweak update_timeout logic again
Jonathan Lebon [Mon, 28 Oct 2019 18:04:55 +0000 (14:04 -0400)]
lib/pull: Tweak update_timeout logic again
I was hitting `SIGSEGV` when running `cosa build` and narrowed it down
to #1954. What's happening here is that because we're using the default
context, when we unref it in the out path, it may not actually destroy
the `GSource` if it (the context) is still ref'ed elsewhere. So then,
we'd still get events from it if subsequent operations iterated the
context.
This patch is mostly a revert of #1954, except that we still keep a ref
on the `GSource`. That way it is always safe to destroy it afterwards.
(And I've also added a comment to explain this better.)
Umang Jain [Fri, 25 Oct 2019 15:28:34 +0000 (20:58 +0530)]
async-progress: Plug memory leak while destroying GSource
See https://gitlab.gnome.org/GNOME/glib/commit/
71973c722
OpenShift Merge Robot [Fri, 25 Oct 2019 14:07:25 +0000 (16:07 +0200)]
Merge pull request #1955 from cgwalters/revert-grub2-exit
Revert grub2 exit, add new grub2: Honor /boot/.grub2-bls-enabled
OpenShift Merge Robot [Fri, 25 Oct 2019 13:50:49 +0000 (15:50 +0200)]
Merge pull request #1956 from akiernan/us-test-export
tests/export: Guard with check for libarchive
Alex Kiernan [Thu, 24 Oct 2019 18:07:30 +0000 (19:07 +0100)]
tests/export: Guard with check for libarchive
If we are built without libarchive support, this test fails:
error: This version of ostree is not compiled with libarchive support
...
ERROR: tests/test-export.sh - too few tests run (expected 5, got 0)
ERROR: tests/test-export.sh - exited with status 1
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Colin Walters [Thu, 24 Oct 2019 15:21:17 +0000 (15:21 +0000)]
Revert "grub2: Exit gracefully if the configuration has BLS enabled"
This reverts commit
985a14100295c99d0c6d712bfbee0ec52a3a1601.
It turned out that some people have old bootloaders, and hence
get the "no entries" problem. That's much, much much worse
than double entries.
OpenShift Merge Robot [Wed, 23 Oct 2019 16:02:30 +0000 (18:02 +0200)]
Merge pull request #1954 from jlebon/pr/update-timeout
lib/pull: Avoid calling destroy on unref'ed GSource
OpenShift Merge Robot [Wed, 23 Oct 2019 15:53:27 +0000 (17:53 +0200)]
Merge pull request #1952 from cgwalters/trivial-rename
build-sys: Rename internal conditionals for trivial-httpd
Jonathan Lebon [Wed, 23 Oct 2019 15:04:00 +0000 (11:04 -0400)]
lib/pull: Avoid calling destroy on unref'ed GSource
We're creating the timer source and then passing ownership to the
context, but because we didn't free the pointer, we would still call
`g_source_destroy` in the exit path. We'd do this right after doing
`unref` on the context too, which would have already destroyed and
unref'ed the source.
Drop that and just restrict the scope of that variable down to make
things more obvious.
Just noticed this after reviewing #1953.
Colin Walters [Mon, 21 Oct 2019 21:45:20 +0000 (21:45 +0000)]
build-sys: Cleanup handling for trivial-httpd-cmdline
This way it's clearer this bit is only about the CLI entrypoint
also living in `ostree trivial-httpd`, not the underlying
`ostree-trivial-httpd` binary that's separate now.
Delete the automake conditional for this, and make the manpage
conditional use `if USE_LIBSOUP` the same way the C build does.
Suggested-by: Jonathan Lebon <jonathan@jlebon.com>
OpenShift Merge Robot [Mon, 21 Oct 2019 21:43:22 +0000 (23:43 +0200)]
Merge pull request #1950 from akiernan/us-revert-trivial-httpd
Revert trivial httpd changes (#1912)
Alex Kiernan [Sat, 19 Oct 2019 21:20:27 +0000 (22:20 +0100)]
Revert "Always enable trivial-httpd for tests"
This reverts commit
82699a67dbb6bfcc9452bb969e7872809232a84f.
Alex Kiernan [Sat, 19 Oct 2019 21:20:25 +0000 (22:20 +0100)]
Revert "Gate ostree-trivial-httpd on BUILDOPT_TRIVIAL_HTTPD"
This reverts commit
83d44ac20ae80d74e05d89744fd1fbd4f45b7fba.
OpenShift Merge Robot [Fri, 18 Oct 2019 18:59:06 +0000 (20:59 +0200)]
Merge pull request #1947 from cgwalters/more-scan-build-2
More scan build 2
OpenShift Merge Robot [Fri, 18 Oct 2019 17:56:14 +0000 (19:56 +0200)]
Merge pull request #1949 from dbnicholson/no-g-gnuc-function
repo: Stop using deprecated G_GNUC_FUNCTION
Dan Nicholson [Fri, 18 Oct 2019 17:10:44 +0000 (11:10 -0600)]
repo: Stop using deprecated G_GNUC_FUNCTION
In glib 2.62 this has been changed to emitting a warning. Use G_STRFUNC
instead, which has been available for a long time and is already used in
other places in ostree.
Colin Walters [Fri, 18 Oct 2019 15:06:51 +0000 (15:06 +0000)]
lib/checksum-utils: Use g_memdup()
This is clearer and silences a scan-build warning.
Colin Walters [Fri, 18 Oct 2019 14:57:47 +0000 (14:57 +0000)]
tests: [scan-build] Initialize a variable
False positive.
Colin Walters [Fri, 18 Oct 2019 14:56:51 +0000 (14:56 +0000)]
lib: Port variant-builder.c to new style
Seeing `scan-build` warning here, prep for fixing it.
Colin Walters [Fri, 18 Oct 2019 14:48:44 +0000 (14:48 +0000)]
tests: Port keyfile test to new style
Just noticed in passing.
Colin Walters [Fri, 18 Oct 2019 14:48:25 +0000 (14:48 +0000)]
lib/pull: [scan-build] Silence a dead store warning
This one was actual duplicate code.
Colin Walters [Fri, 18 Oct 2019 14:45:33 +0000 (14:45 +0000)]
lib/repo: [scan-build] Quiet a dead store warning
False positive, just add a pacifier.
Colin Walters [Wed, 16 Oct 2019 19:36:31 +0000 (19:36 +0000)]
tree-wide: [scan-build] Fix some dead stores
No real issues, just quieting the scanner.
OpenShift Merge Robot [Wed, 16 Oct 2019 21:12:34 +0000 (23:12 +0200)]
Merge pull request #1945 from cgwalters/papr-trim
ci: Trim PAPR config to drop required flag
OpenShift Merge Robot [Wed, 16 Oct 2019 18:44:15 +0000 (20:44 +0200)]
Merge pull request #1943 from cgwalters/more-scan-build
More scan build
Colin Walters [Wed, 16 Oct 2019 18:38:37 +0000 (18:38 +0000)]
ci: Trim PAPR config to drop required flag
Same as https://github.com/coreos/rpm-ostree/pull/1923
Quoting that rationale:
> Since we're not using Homu anymore (and Tide instead looks at
> all statuses by default), let's just drop it. This brings down the
> number of statuses on PRs by one more (and so one less context to
> override when needed).
OpenShift Merge Robot [Wed, 16 Oct 2019 18:15:56 +0000 (20:15 +0200)]
Merge pull request #1912 from akiernan/us-fix-trivial-httpd
Gate ostree-trivial-httpd on BUILDOPT_TRIVIAL_HTTPD
OpenShift Merge Robot [Wed, 16 Oct 2019 15:21:10 +0000 (17:21 +0200)]
Merge pull request #1937 from cgwalters/zipl-backend
bootloader: Add a zipl bootloader backend
OpenShift Merge Robot [Wed, 16 Oct 2019 15:05:31 +0000 (17:05 +0200)]
Merge pull request #1931 from cgwalters/covscan-fixes
libotutil: Port keyfile-utils.c to new style
OpenShift Merge Robot [Wed, 16 Oct 2019 14:24:57 +0000 (16:24 +0200)]
Merge pull request #1942 from cgwalters/build-installdeps
ci: Skip all yum operations if SKIP_INSTALLDEPS is set
Colin Walters [Mon, 14 Oct 2019 19:22:19 +0000 (19:22 +0000)]
bootloader: Add a zipl bootloader backend
zipl is a bit special in that it parses the BLS config files
directly *but* we need to run the command to update the "boot block".
Hence, we're not generating a separate config file like the other
backends. Instead, extend the bootloader interface with a `post_bls_sync`
method that is run in the same place we swap the `boot/loader` symlink.
We write a "stamp file" in `/boot` that says we need to run this command.
The reason we use stamp file is to prevent the case where the system is
interrupted after BLS file is updated, but before zipl is triggered,
then zipl boot records are not updated.
This opens the door to making things eventually-consistent/reconcilable
by later adding a systemd unit to run `zipl` if we're interrupted via
a systemd unit - I think we should eventually take this approach
everywhere rather than requiring `/boot/loader` to be a symlink.
Author: Colin Walters <walters@verbum.org>
Tested-by: Tuan Hoang <tmhoang@linux.ibm.com>
Co-Authored-By: Tuan Hoang <tmhoang@linux.ibm.com>
Colin Walters [Wed, 16 Oct 2019 13:48:20 +0000 (13:48 +0000)]
prune: [scan-build] Initialize a variable
Another false positive because we only read this if `opt_keep_younger_than` is `TRUE`,
but let's initialize variables on general principle.
Colin Walters [Wed, 16 Oct 2019 13:44:46 +0000 (13:44 +0000)]
tree-wide: [scan-build]: Add some asserts that pointers are non-NULL
More "scan-build doesn't understand GError and our out-param conventions"
AKA "these errors would be impossible with Rust's sum type Result<> approach".
Colin Walters [Wed, 16 Oct 2019 13:38:29 +0000 (13:38 +0000)]
commit: [scan-build] Remove a dead assignment
The `write_commit()` API defaults to current time, and
this assignment became dead in:
https://github.com/ostreedev/ostree/commit/
8ba90a33410c9707a30a77f808a7ec712d465165
Colin Walters [Wed, 16 Oct 2019 13:32:36 +0000 (13:32 +0000)]
ci: Skip all yum operations if SKIP_INSTALLDEPS is set
This is used by our OpenShift Prow job; we use the
cosa buildroot container:
https://github.com/coreos/coreos-assembler/pull/730
And using `yum` at all means we can flake on fetching rpm metadata.
Colin Walters [Mon, 14 Oct 2019 13:19:28 +0000 (13:19 +0000)]
libotutil: Port keyfile-utils.c to new style
I was trying to fix a clang `scan-build` error that jlebon
ended up tracking down in
https://github.com/ostreedev/ostree/pull/1939/commits/
9344de1ce1e8c185e01988277606ba1ed7f9d16b
But in the process of tracing through this I found it
way easier to read as "new style" code, so this also ports the
code.
I added a `g_assert()` in there too to help assert that
`g_key_file_get_value` won't leak in the error path.
OpenShift Merge Robot [Tue, 15 Oct 2019 17:56:54 +0000 (19:56 +0200)]
Merge pull request #1932 from cgwalters/covscan-fixes-2
libostree: Add an assert to pacify clang-analyzer
OpenShift Merge Robot [Tue, 15 Oct 2019 17:13:56 +0000 (19:13 +0200)]
Merge pull request #1939 from jlebon/pr/fix-keyfile-leak
src/libotutil: Fix strv memory leak
Jonathan Lebon [Tue, 15 Oct 2019 15:56:34 +0000 (11:56 -0400)]
src/libotutil: Fix strv memory leak
We were only freeing the array and not the members.
Caught by `clang-analyzer` in:
https://github.com/ostreedev/ostree/pull/1931
OpenShift Merge Robot [Tue, 15 Oct 2019 15:59:00 +0000 (17:59 +0200)]
Merge pull request #1933 from cgwalters/scan-build-0
A few more scan-build fixes
Colin Walters [Mon, 14 Oct 2019 14:24:18 +0000 (14:24 +0000)]
repo: [scan-build]: Mark a variable used
We're just using this to auto-free, quiet the static analysis.
Colin Walters [Mon, 14 Oct 2019 14:22:12 +0000 (14:22 +0000)]
sysroot: [scan-build] Remove a dead assignment
Just quieting the scan.
Colin Walters [Mon, 14 Oct 2019 14:20:44 +0000 (14:20 +0000)]
sysroot: [scan-build]: Remove a dead assignment
Clarify the conditionals here and remove a dead assignment.
Colin Walters [Mon, 14 Oct 2019 14:17:09 +0000 (14:17 +0000)]
repo: [scan-build] Initialize a variable
Another GLib error convention issue; but eh, we might as
well be conservative and always initialize variables.
Colin Walters [Mon, 14 Oct 2019 13:25:46 +0000 (13:25 +0000)]
libostree: Add an assert to pacify clang-analyzer
Got this error when trying to rebase libostree in RHEL:
```
Error: CLANG_WARNING: [#def1]
libostree-2019.2/src/libostree/ostree-repo-checkout.c:375:21: warning: Access to field 'disable_xattrs' results in a dereference of a null pointer (loaded from variable 'repo')
```
I think what's happening is it sees us effectively testing
`if (repo == NULL)` via the `while (current_repo)`. Let's
tell it we're sure it's non-null right after the loop.
Colin Walters [Mon, 14 Oct 2019 20:29:05 +0000 (16:29 -0400)]
Merge pull request #1938 from cgwalters/owners-file
OWNERS: New file
Colin Walters [Mon, 14 Oct 2019 19:47:23 +0000 (19:47 +0000)]
OWNERS: New file
I tried to balance reflecting the reality of who works on libostree
today with keeping some of the existing committers - particularly
committers from multiple organizations.
Part of switching libostree over to OpenShift Prow.
Colin Walters [Mon, 14 Oct 2019 14:59:31 +0000 (10:59 -0400)]
Merge pull request #1934 from cgwalters/mkdir-artifacts
ci: Make ${ARTIFACTS} directory
Colin Walters [Mon, 14 Oct 2019 14:29:31 +0000 (14:29 +0000)]
ci: Make ${ARTIFACTS} directory
It may not exist in OpenShift Prow by default.
Colin Walters [Fri, 11 Oct 2019 20:25:48 +0000 (20:25 +0000)]
ci: Honor ARTIFACTS environment variable
This is set by the OpenShift Prow pod-utils:
https://github.com/openshift/test-infra/blob/master/prow/pod-utilities.md
Prep for having OSTree use that.
Closes: #1930
Approved by: jlebon
Alex Kiernan [Thu, 5 Sep 2019 12:22:15 +0000 (13:22 +0100)]
Gate ostree-trivial-httpd on BUILDOPT_TRIVIAL_HTTPD
When building without --enable-trivial-httpd-cmdline, don't build or install
the ostree-trivial-httpd binary.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Alex Kiernan [Wed, 4 Sep 2019 16:29:15 +0000 (17:29 +0100)]
Always enable trivial-httpd for tests
When running tests we always need ostree-trivial-httpd, so enable it
unconditionally
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Javier Martinez Canillas [Thu, 26 Sep 2019 15:33:57 +0000 (17:33 +0200)]
grub2: Exit gracefully if the configuration has BLS enabled
Since Fedora 30 grub2 has support to populate its menu entries from the
BootLoaderSpec fragments in /boot/loader/entries, so there's no need to
generate menu entries anymore using the /etc/grub.d/15_ostree script.
But since ostree doesn't update the bootloader, it may be that the grub2
installed is an old one that doesn't have BLS support.
For new installs, GRUB_ENABLE_BLSCFG=true is set in /etc/default/grub to
tell the /etc/grub.d/10_linux script if a blscfg command has to be added
to the generated grub2 config file.
So check if BLS is enabled in /etc/default/grub and only add the entries
if that's not the case. Otherwise the menu entries will be duplicated.
The approach has the drawback that if a user sets GRUB_ENABLE_BLSCFG=true
in /etc/default/grub without updating grub2, they will get an empty menu.
Since there won't be any entries created by the 30_ostree script and the
blscfg command won't work on the older grub2.
Unfortunately there is no way to know if the installed grub2 already has
BLS support or not.
Related: https://bugzilla.redhat.com/show_bug.cgi?id=
1751272#c27
Closes: #1929
Approved by: jlebon
Jonathan Lebon [Wed, 25 Sep 2019 15:27:38 +0000 (11:27 -0400)]
configure.ac: Add more details on how to do a release
Closes: #1928
Approved by: cgwalters
Jonathan Lebon [Wed, 25 Sep 2019 13:39:19 +0000 (09:39 -0400)]
Post-release version bump
Closes: #1927
Approved by: cgwalters
Jonathan Lebon [Wed, 25 Sep 2019 13:37:48 +0000 (09:37 -0400)]
Release 2019.4
Tiny release. Just want to get out the important bugfixes instead of
backporting patches (notably the gpg-agent stuff and
`ostree-finalize-staged.service` ordering).
Closes: #1927
Approved by: cgwalters
Jonathan Lebon [Tue, 24 Sep 2019 21:08:54 +0000 (17:08 -0400)]
boot/finalize-staged: Run after systemd-journal-flush.service
In Fedora 31, `systemd-journal-flush.service` uses a new
`--smart-relinquish-var` switch which fixes the
`umount: /var: target is busy` bug by telling journald to stop logging
to `/var` and back to `/run` again during shutdown.
This interacted with `ostree-finalize-staged.service` in a tricky way:
since we weren't strongly ordered against it, when we happened to
finalize after `/var` is relinquished, we never persisted the output
from that service to disk. This then threw off `rpm-ostree status` when
trying to find the completion message to know that finalization went
well.
Just fix this by adding an explicit `After=` on that unit. That way we
shut down *before* `systemd-journal-flush.service` (the `/var`
relinquish bit happens in its `ExecStop=`).
For more info, see:
https://github.com/systemd/systemd/commit/
3ff7a50d66e3f851d3d9f132b740a7fb2055aa1d
https://github.com/systemd/systemd/commit/
1e187d2dd52cbb4f0bb30e4d96acf7f72a145b91
https://bugzilla.redhat.com/show_bug.cgi?id=
1751272
Closes: #1926
Approved by: cgwalters
Philip Withnall [Mon, 21 May 2018 15:01:13 +0000 (16:01 +0100)]
lib/repo-pull: Add more debugging on pull failure
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Closes: #1925
Approved by: cgwalters
Benjamin Gilbert [Fri, 13 Sep 2019 06:37:01 +0000 (02:37 -0400)]
prepare-root: remember to remove /sysroot.tmp
Without this, rerunning ostree-prepare-root will fail in mkdir()
because /sysroot.tmp already exists, which complicates debugging from
the dracut emergency shell.
Closes: #1919
Approved by: cgwalters
Colin Walters [Mon, 9 Sep 2019 14:23:20 +0000 (14:23 +0000)]
fsck: Fix version in docs, tweak error text
I think this error message is clearer.
Closes: #1918
Approved by: jlebon
Jason Wessel [Wed, 10 Jul 2019 18:42:27 +0000 (14:42 -0400)]
fsck: Add test for --delete corruption, fix repair, and partial commit checks
The ostree fsck test is aimed to check that it will still fail an fsck
if the repository has been repaired by fsck. It also checks that a
pull operation corrects the error and ostree fsck will exit with zero.
The test was modeled after the following script:
rm -rf ./f1
mkdir -p ./f1
./ostree --repo=./f1 init --mode=archive-z2
mkdir -p ./trial
echo test > ./trial/test
./ostree --repo=./f1 commit --tree=dir=./trial --skip-if-unchanged --branch=exp1 --subject="test Commit"
rm -rf ./f2
mkdir -p ./f2
./ostree --repo=./f2 init
./ostree --repo=./f2 pull-local ./f1
echo whoops > `find ./f2 |grep objects |grep \\.file `
./ostree fsck --repo=./f2 ; echo Exit: $?
./ostree fsck --delete --repo=./f2 ; echo Exit: $?
./ostree fsck --repo=./f2 ; echo Exit: $?
./ostree --repo=./f2 pull-local ./f1
./ostree fsck --repo=./f2 ; echo Exit: $?
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
fsck: Update test so that it will pass on fs without xattrs
The fsck test does not require xattrs to prove that it works. It is
simple enough to change it to use an archvie instead of a bare type
repository.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Closes: #1910
Approved by: cgwalters
Jason Wessel [Wed, 10 Jul 2019 18:47:27 +0000 (14:47 -0400)]
fsck: Implement a partial commit reason bitmask
After the corruption has been fixed with "ostree fsck -a --delete", a
second run of the "ostree fsck" command will print X partial commits
not verified and exit with a zero.
The zero exit code makes it hard to detect if a repair operation needs
to be run. When ever fsck creates a partial commit it should add a
reason for the partial commit to the state file found in
state/<hash>.commitpartial. This will allow a future execution of the
fsck to still return an error indicating that the repository is still
in the damaged state, awaiting repair.
Additional reason codes could be added in the future for why a partial
commit exists.
Text from: https://github.com/ostreedev/ostree/pull/1880
====
cgwalters commented:
To restate, the core issue is that it's valid to have partial commits
for reasons other than fsck pruned bad objects, and libostree doesn't
have a way to distinguish.
Another option perhaps is to write e.g. fsck-partial into the
statefile state/<hash>.commitpartial which would mean "partial, and
expected to exist but was pruned by fsck" and fsck would continue to
error out until the commit was re-pulled. Right now the partial stamp
file is empty, so it'd be fully compatible to write a rationale into
it.
====
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Closes: #1910
Approved by: cgwalters
Dan Nicholson [Fri, 6 Sep 2019 22:52:15 +0000 (16:52 -0600)]
lib/gpg: Use g_spawn_sync to kill gpg-agent
For reasons I don't understand, GSubprocess doesn't play nice with KDE's
plasmashell. I assume this has something to do with the GSubprocess
using the glib worker thread while plasmashell uses the glib main
loop. Instead, just use g_spawn_sync to fork and wait in the current
thread.
Fixes: #1913
Closes: #1917
Approved by: cgwalters
Dan Nicholson [Thu, 5 Sep 2019 18:20:04 +0000 (12:20 -0600)]
lib/gpg: Don't kill gpg-agent on newer gnupg
GnuPG 2.1.17 contains a bug fix so that `gpg-agent` is killed when the
entire GPG home directory is deleted[1]. If the host's GnuPG is new
enough, then we don't need to bother calling `gpg-connect-agent` to kill
the agent since it will be cleaned up on its own.
Get the GnuPG version from the GPGME OpenPGP engine info and parse it to
see if it matches this criteria.
1. https://dev.gnupg.org/T2756
Closes: #1915
Approved by: cgwalters
Dan Nicholson [Fri, 16 Aug 2019 04:24:54 +0000 (22:24 -0600)]
lib/gpg: Only show gpg-connect-agent stderr on failures
When listing GPG keys, the temporary GPG homedir will be constructed by
simply copying the remote's trusted keys to the pubring.gpg file. In
that case, no GPG operations spawning gpg-agent will be run. When
gpg-connect-agent is run to cleanup the homedir, it will helpfully print
on stderr that it's starting gpg-agent like so:
gpg-connect-agent: no running gpg-agent - starting '/usr/bin/gpg-agent'
gpg-connect-agent: waiting for the agent to come up ... (5s)
gpg-connect-agent: connection to agent established
Send gpg-connect-agent's stderr to a pipe and only send it to the
application's stderr if an error was encountered.
Fixes: #1907
Closes: #1908
Approved by: cgwalters